package com.tsoj.tsojquestionservice.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tsoj.model.dto.question.QuestionAddRequest;
import com.tsoj.model.dto.question.QuestionQueryRequest;
import com.tsoj.model.dto.question.QuestionUpdateRequest;
import com.tsoj.model.po.Question;
import com.tsoj.model.vo.QuestionVO;


/**
* @author 孙金硕
* @description 针对表【question(题目)】的数据库操作Service
* @createDate 2025-04-15 09:58:00
*/

public interface QuestionService extends IService<Question> {
    //添加题目
    Long addQuestion(QuestionAddRequest questionAddRequest);
    //更新题目
    Boolean updateQuestion(QuestionUpdateRequest updateRequest);
    //脱敏处理
    QuestionVO handle(Question question);
    //拿到查询条件
    Wrapper<Question> getQueryWrapper(QuestionQueryRequest questionQueryRequest);
    //封装成VO进行脱敏处理
    Page<QuestionVO> queryVO(Page<Question> page);
    //参数验证
    void validQuestion(Question question, boolean b);
}
